﻿using System;
using SocialFront.Providers.User;
using umbraco.BusinessLogic;

namespace SocialFront.Provider.Umbraco
{
    public class UmbracoUser : UserBase
    {
        /// <summary>
        /// Gets the system user. 
        /// </summary>
        /// <returns></returns>
        public override User GetSystemUser()
        {
            //return new User(Config.sfSystemUserId);
            return new User("SocialFrontSystemUser");
        }

        /// <summary>
        /// Creates the system user.
        /// </summary>
        /// <returns>The id of the system user just created.</returns>
        //public override int CreateSystemUser()
        //{
        //    User.MakeNew("SocialFrontSystemUser", "SocialFrontSystemUser", "", "", UserType.GetUserType(1));

        //    User systemUser = new User("SocialFrontSystemUser");

        //    // TODO: disable umbraco access for system user

        //    NodeHelper.AddKeysToWebConfig("sfSystemUserId", systemUser.Id.ToString());
        //    return systemUser.Id;
        //}
    }
}